/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.pa165.ddtroops.serviceinterfaces;

import cz.muni.fi.pa165.ddtroops.dto.HeroDTO;
import cz.muni.fi.pa165.ddtroops.dto.RaceDTO;
import cz.muni.fi.pa165.ddtroops.dto.UserDTO;
import cz.muni.fi.pa165.ddtroops.entities.Gender;
import java.util.List;

/**
 *
 * @author Matěj
 */
public interface HeroService
{
    /**
     * Method creates new Hero object.
     * @param user
     * @param gender
     * @param belief
     * @param profession
     * @param race
     * @param strength
     * @param dexterity
     * @param constitution
     * @param intelligence
     * @param wisdom
     * @param charisma
     * @return
     */
    HeroDTO createNewHero(Gender gender, String belief, String profession, RaceDTO race,
            Byte strength, Byte dexterity, Byte constitution, Byte intelligence,
            Byte wisdom, Byte charisma);

    /**
     * Method creates new Squad from Hero object.
     * @param hero instance of class Hero to be created
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    void create(HeroDTO heroDTO);

    /**
     * Method update updates state of given Hero.
     * @param hero instance of class Hero to be updated
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    void update(HeroDTO heroDTO);

    /**
     * Method delete deletes given Hero.
     * @param hero instance of class Hero to be removed
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    void delete(HeroDTO heroDTO);

    /**
     * Method getById retrieves Hero with specified id
     * @param id id of Hero
     * @return instance of class Hero with specified id
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    HeroDTO getById(Long id);

    /**
     * Method getAll fetches all the Heroes.
     * @return list of instances of class Hero
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    List<HeroDTO> getAll();
    
    /**
     * Method getUser fetches the owner of specified hero
     * @return owner or null if there is no such hero
     * @throws DataAccessException in case of any exception on a persistence layer
     */
    UserDTO getUser(HeroDTO heroDTO);
}
